package com.dindang.propertyfee.di.module;

import com.dindang.propertyfee.mvp.contract.PropertyFeeRecordContract;
import com.dindang.propertyfee.mvp.model.PropertyFeeRecordModel;
import com.jess.arms.di.scope.FragmentScope;

import dagger.Module;
import dagger.Provides;


@Module
public class PropertyFeeRecordModule {
    private PropertyFeeRecordContract.View view;

    /**
     * 构建PropertyFeeRecordModule时,将View的实现类传进来,这样就可以提供View的实现类给presenter
     *
     * @param view
     */
    public PropertyFeeRecordModule(PropertyFeeRecordContract.View view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    PropertyFeeRecordContract.View providePropertyFeeRecordView() {
        return this.view;
    }

    @FragmentScope
    @Provides
    PropertyFeeRecordContract.Model providePropertyFeeRecordModel(PropertyFeeRecordModel model) {
        return model;
    }
}